﻿using QLBH.DATA;
using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.BUSINESS
{
    public class KhachHangBus
    {
        private static KhachHangData db = new KhachHangData();
        public static List<KHACH_HANG> TimKhachHangTheoTen(string ten_khach_hang, int tong_so_dong)
        {
            return db.TimKhachHangTheoTen(ten_khach_hang, tong_so_dong);
        }

        public static string ThemMoi(KHACHHANGPARAM KHACHHANG)
        {
            if (db.ThemMoi(KHACHHANG))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string CapNhat(KHACHHANGPARAM KHACHHANG)
        {
            if (db.CapNhat(KHACHHANG))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string Xoa(string[] MA_KHACH_HANG)
        {
            if (db.Xoa(MA_KHACH_HANG))
            {
                return "1";
            }
            else
                return db.Error;
        }

    }
}